package viewInterfaces;

import javax.swing.JPanel;

import model.Project;
import modelInterfaces.IProject;
import view.ViewMain;
import controller.ControllerMain;
import controllerInterfaces.IControllerMain;

/**
 * 
 * Interface of {@link ViewMain} controller class according to Abstract Factory design pattern.
 *
 */
public interface IViewMain extends IViewFrame {
	
	/**
	 * Set the MVC++ Main Class for this View.</br>
	 * ControllerMain is manipulable through {@link IControllerMain} interface
	 * @param	controller	MVC++ Main Controller
	 * @see	ControllerMain
	 * @see IControllerMain
	 */
	public void SetController(IControllerMain controller);
	
	
	/**
	 * Set and add the panel to {@link tabbedPane}.
	 * @param	name	panel name
	 * @param	panel	panel to set and add in {@link tabbedPane}
	 */	
	public void SetTabbedPane(String name, JPanel panel);

	
	
	/**
	 * Set frame title according to parameter name.
	 * @param name	project name 
	 * @see Project
	 * @see IProject
	 */	
	public void setProjectNameinFrame(String name);
	
	
	
	/**
	 * Enable or disable button for create new project according to parameter value.
	 * @param value	True for enable to button. False for disable to button
	 * @see Project
	 */
	public void setNewProjectButtonEnabled(boolean value);
	
	
	
	/**
	 * Enable or disable button for load a existing project according to parameter value.
	 * @param value	True for enable to button. False for disable to button
	 * @see Project
	 */
	public void setLoadProjectButtonEnabled(boolean value);
	
	
	
	/**
	 * Enable or disable button for save a current project according to parameter value.
	 * @param value	True for enable to button. False for disable to button
	 * @see Project
	 */
	public void setSaveProjectButtonEnabled(boolean value);
	
	
	
	/**
	 * Enable or disable button for save a new copy of current project according to parameter value.
	 * @param value	True for enable to button. False for disable to button
	 * @see Project
	 */
	public void setSaveAsProjectButtonEnabled(boolean value);



	/**
	 * Set label of project status according to parameter str and value
	 * @param str string of project status
	 * @param value if it is true then label will be enabled, otherwise will be disabled
	 */	
	public void SetLabelProjectStatus(String str, boolean value);

	
	/**
	 * Set filename of project according to parameter str and value
	 * @param str filename of project
	 * @param value if it is true then label will be enabled, otherwise will be disabled
	 */	
	public void SetLabelFileName(String str, boolean value);


	/**
	 * Set status of database connection according to parameters str and value.
	 * @param str status of database connection
	 * @param value if it is true (connected database) then label will be enabled, otherwise (disconnected database) will be disabled
	 */		
	public void setLabelDBStatus(String str, boolean value);


	
	/**
	 * Start Project Management for create a new project.
	 */
	public void startProjectManagementToCreateByController();
	
	
	/**
	 * Start Project Management for load a existing project.
	 */
	public void startProjectManagementToLoadByController();
	
	
	/**
	 * Start Project Management for save a current project.
	 */	
	public void startProjectManagementToSaveByController();
	
	
	/**
	 * Start Project Management for save copy of a current project.
	 */	
	public void startProjectManagementToSaveAsByController();
	
	
	/**
	 * Start database connection setup.
	 */
	public void startDBConnectionSetup();	
	
	
	/**
	 * Close application by controller.
	 */	
	public void closeByController();		
		
	
}
